package factory_method;

public class ShapeFactory {
	public Shape getShape(String shapeType){
		Shape shape;
		switch (shapeType.toLowerCase()) {
		case "circle":
			shape = new Circle();
			break;
		case "rectangle": 
			shape = new Rectangle();
			break;
		case "triangle":
			shape = new Triangle();
			break;
		default:
			shape = null;
		}
		return shape;
	}
}
